package model

type CowBarn struct {
	Id        int64  `gorm:"primary_key" json:"id"`
	PastureId int64  `json:"pasture_id"`
	HouseUuid string `json:"house_uuid"`
	HouseName string `json:"house_name"`
	CowNum    string `json:"cow_num"`
	PenId     int    `json:"pen_id"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

func (c *CowBarn) TableName() string {
	return "y_cow_barn"
}

func NewCowBarn(pastureId int64, houseUuid, houseName, cowNumber string, penId int) *CowBarn {
	return &CowBarn{
		PastureId: pastureId,
		HouseUuid: houseUuid,
		HouseName: houseName,
		CowNum:    cowNumber,
		PenId:     penId,
	}
}
